class LazerBeam extends Actor;

var ParticleSystemComponent BeamComponent;

var PointLightComponent LightEnvironment;
var name EndPointParamName;
var name StartPointParamName;

function bool IsActive()
{
	return BeamComponent.bIsActive;
}

function Toggle()
{
	if(IsActive())
	{
		BeamComponent.DeactivateSystem();
	}
	else
	{
		BeamComponent.ActivateSystem();
	}
}

function SetupBeam(Vector end, Rotator rot)
{
	BeamComponent.SetVectorParameter(EndPointParamName, end);
	BeamComponent.SetRotation(rot);
}

DefaultProperties
{
	bGameRelevant=true
	
	Begin Object Class=ParticleSystemComponent Name=MyBeamComponent
		Template=ParticleSystem'WP_LinkGun.Effects.P_WP_Linkgun_Altbeam_Gold'
		bAutoActivate=false
	End Object

	Components.Add(MyBeamComponent)
	BeamComponent=MyBeamComponent

	Begin Object Class=PointLightComponent Name=MyLightEnvironment
		Radius=100.0
		Brightness=3
		CastShadows=false
		LightColor=(R=255,G=0,B=0)
		bEnabled=true
	End Object
	Components.Add(MyLightEnvironment)
	LightEnvironment=MyLightEnvironment

	EndPointParamName=LinkBeamEnd
	StartPointParamName=LinkBeamStart

	
}
